﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Bussines;

namespace ownx
{
    public partial class wfChangePW : System.Web.UI.Page
    {
        clUser _clUser;
        int _USR_ID = -1;

        protected void Page_Load(object sender, EventArgs e)
        {
            TBLObj blObj = null;
            if (Session["BL"] != null)
            {
                blObj = (TBLObj)Session["BL"];
            }
            _USR_ID = (int)Session["USR_ID"];
            //TBLObj blObj = new TBLObj("Test", Session["CONSTR"].ToString(), (clFIELDINFO_LIST)Session["FIELDINFO"]);
            _clUser = new clUser(blObj);
        }


        protected void bCancel_Click(object sender, EventArgs e)
        {
            Response.Redirect("wfDefault.aspx");
        }

        protected void bOk_Click(object sender, EventArgs e)
        {
            string Err = "";
            _clUser.ChangePassword(_USR_ID, tbRegi.Text, tbUj1.Text, tbUj2.Text, ref Err);

            lMessage.Text = Err;
            
        }
    }
}
